package com.china.springServer.task;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.concurrent.Executor;

/**
 * @fileName: MyThreadPoolExecutor
 * @author: LmR
 * @createDate: 2024/3/23 21:54
 * @Desc:
 */
@Component
public class MyThreadPoolExecutor {

    @Resource(name = "myDefaultThreadPool")
    private Executor myExecutor;

    public void submit(ConsumerTask task) {
        myExecutor.execute(task);
    }
}
